package com.njym.java.security.app.mapper;


import com.njym.java.security.app.entity.UserGroupsToUser;
import com.njym.java.security.app.entity.UserGroupsToUserVo;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * 
 * 
 * @author lijie
 * @email 717057076@qq.com
 * @date 2019-11-22 16:44:11
 */

public interface UserGroupsToUserMapper extends Mapper<UserGroupsToUser> {
    /**
     * 查询会客厅
     * @param userId
     * @param isFamily
     * @return
     */
	List<UserGroupsToUserVo> queryGroup(@Param("userId") Integer userId, @Param("isFamily") Integer isFamily);

    /**
     * 查询群成员信息
     * @param groupId
     * @return
     */
    List<UserGroupsToUserVo> queryGroupUser(@Param("groupId") Integer groupId);

    /**
     * 退群
     * @param groupId
     * @param userId
     * @return
     */
    int quitGroupTo(@Param("groupId") Integer groupId, @Param("userId") Integer userId);

    /**
     * 解散群
     * @param groupId
     * @return
     */
    int dissolveGroupTo(@Param("groupId") Integer groupId);
}
